package ru.jexp.rcp.supply.beans.correlate;

import java.util.List;

import ru.jexp.izdelie.scet.RaznesenieStrokiNakladnoi;
import ru.jexp.rcp.supply.mui.JExpSupplyMessages;
import ru.jexp.rcp.supply.wizard.JExpWizardDefault;
import ru.jexp.ucet.nakladnaa.Nakladnaa;

public class WizardCorrelate extends JExpWizardDefault implements
		IWizardCorrelate {

	public WizardCorrelate() {
		super();
		setWindowTitle(JExpSupplyMessages.Correlate_wizard_action_text);
		new WizardCorrelatePrezentor(this);
	}

	@Override
	public void addPages() {
		addPage(new WizardPageNakl());
		addPage(new WizardPageCorrelate());
	}

	@Override
	public boolean performFinish() {
		return false;
	}

	@Override
	public Nakladnaa getNaklLookupData() {
		return getNaklPage().getNaklLookupData();
	}

	@Override
	public void setInputNaklStrViewer(List<RaznesenieStrokiNakladnoi> naklStr) {
		getCorrelatePage().setInputNaklStrViewer(naklStr);
	}

	private WizardPageCorrelate getCorrelatePage() {
		return (WizardPageCorrelate) getPage(JExpSupplyMessages.Correlate_wizard_correlate_pagename);
	}

	private WizardPageNakl getNaklPage() {
		return (WizardPageNakl) getPage(JExpSupplyMessages.Correlate_wizard_nakl_pagename);
	}
}
